<template>
  <div class="container">
    <van-search shape="round" v-model="value" placeholder="搜索订单" />
    <van-tabs v-model="active" sticky class="dd">
      <van-tab title="全部"
        ><div class="order">
          <div>
            <img
              src="https://b.yzcdn.cn/public_files/80c25e13ccef83035c6f16d31bc93c55.png"
            />
            <span>汇源果汁官方旗舰店</span>
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-xiangyoujiantou"></use>
            </svg>
          </div>
          <div>
            <span>等待买家付款</span>
          </div>
        </div>
        <div class="message">
          <div class="iimg">
            <img
              src="https://img01.yzcdn.cn/upload_files/2022/09/07/FnHctxB8nq70jSQPzBNrLW9ZpQGU.jpg!small.webp"
            />
          </div>

          <div class="jiewei">
            <div class="name">
              <div>
                <div>
                  <span
                    >【预售】易烊千玺同款汇源100%橙汁两联包1L*2盒装饮料尝鲜装</span
                  >
                </div>

                <div>付款成功2天后发货</div>
                <div>
                  <span> 预售 </span>
                </div>
              </div>

              <div class="price">
                <div class="pce">&yen;28.80</div>
                <div class="count">x1</div>
              </div>
            </div>
          </div>
        </div>
        <div class="youhui">
          <span>优惠5.00元,</span>
          <span>应付款</span>
          <span>&yen;</span>
          <span>
            <span class="cu">23</span>
            <span class="xiaoshu">.80</span>
          </span>
        </div>
        <div class="xiugai">
          <button class="btn1">取消订单</button>
          <!-- 24小时后变为删除订单 -->
          <!-- <button class="btn1" @click="to">删除订单</button> -->
          <button class="btn02">立即付款</button>
          <!--24小时后变为再来一单  -->
          <!-- <button class="btn2">再来一单</button> -->
        </div>
      </van-tab>
      <van-tab title="待付款">
        <div class="order">
          <div>
            <img
              src="https://b.yzcdn.cn/public_files/80c25e13ccef83035c6f16d31bc93c55.png"
            />
            <span>汇源果汁官方旗舰店</span>
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-xiangyoujiantou"></use>
            </svg>
          </div>
          <div>
            <span>等待买家付款</span>
          </div>
        </div>
        <div class="message">
          <div class="iimg">
            <img
              src="https://img01.yzcdn.cn/upload_files/2022/09/07/FnHctxB8nq70jSQPzBNrLW9ZpQGU.jpg!small.webp"
            />
          </div>

          <div class="jiewei">
            <div class="name">
              <div>
                <div>
                  <span
                    >【预售】易烊千玺同款汇源100%橙汁两联包1L*2盒装饮料尝鲜装</span
                  >
                </div>

                <div>付款成功10天后发货</div>
                <div>
                  <span> 预售 </span>
                </div>
              </div>

              <div class="price">
                <div class="pce">&yen;28.80</div>
                <div class="count">x1</div>
              </div>
            </div>
          </div>
        </div>
        <div class="youhui">
          <span>优惠5.00元,</span>
          <span>应付款</span>
          <span>&yen;</span>
          <span>
            <span class="cu">23</span>
            <span class="xiaoshu">.80</span>
          </span>
        </div>
        <div class="xiugai">
          <button class="btn1">取消订单</button>
          <!-- 24小时后变为删除订单 -->
          <!-- <button class="btn1" @click="to">删除订单</button> -->
          <button class="btn02">立即付款</button>
          <!--24小时后变为再来一单  -->
          <!-- <button class="btn2">再来一单</button> -->
        </div>
      </van-tab>
      <div class="swiper">
        <div>
          <span>大家喜欢</span>
        </div>

        <div class="box">
          <van-swipe class="my-swipe" :autoplay="1000" indicator-color="white">
            <van-swipe-item>
              <img
                src="https://img0.baidu.com/it/u=1156520697,4040290757&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
              />
            </van-swipe-item>
            <van-swipe-item>
              <img
                src="https://img0.baidu.com/it/u=1156520697,4040290757&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
            /></van-swipe-item>
            <van-swipe-item>
              <img
                src="https://img0.baidu.com/it/u=1156520697,4040290757&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
              />
            </van-swipe-item>
            <van-swipe-item>
              <img
                src="https://img0.baidu.com/it/u=1156520697,4040290757&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
              />
            </van-swipe-item>
          </van-swipe>
          <div class="want">
            <!-- <span>16人想要</span> -->
          </div>
        </div>

        <div class="jiantou">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-youjiantou"></use>
          </svg>
        </div>
      </div>

      <!-- <van-tab title="代发货">内容 3</van-tab>
      <van-tab title="待收货">内容 4</van-tab>
      <van-tab title="待评价">内容 4</van-tab>  -->
    </van-tabs>
    <van-divider
      :style="{ color: '#333', borderColor: '#dcdee0', padding: '0 16px' }"
    >
      更多精选商品
    </van-divider>
    <more-products />
  </div>
</template>
//
<script>
import MoreProducts from "@/components/MoreProducts.vue";

export default {
  components: { MoreProducts },
  // methods: {
  //   to() {
  //     Dialog.confirm({
  //       title: "标题",
  //       message: "弹窗内容",
  //     })
  //       .then(() => {
  //         // on confirm
  //       })
  //       .catch(() => {
  //         // on cancel
  //       });
  //   },
  //   showPopup() {
  //     this.show = true;
  //   },
  // },
  data() {
    return {
      active: 2,
      value: "",
      show: false,
    };
  },
};
</script>

<style lang="scss" scoped>
// @import url("/public/css/swiper-bundle.min.css");
// 正常版心约束
.container {
  margin: 0 auto;
  width: 21.95rem;
}
// 整个订单
.dd {
  margin-bottom: 100px;
  user-select: none;
}
// 小块订单
.order {
  display: flex;
  justify-content: space-between;
}
// 小块订单下的div们
.order div {
  font-family: PingFangSC-Medium;
  text-align: right;
  line-height: 18px;
  font-size: 14px;
  display: inline-block;
  padding: 16px 12px 4px;
  //   width: 100%;
}
// 品牌二字
.order img {
  display: inline-block;
  width: 1.875rem;
  height: 1rem;
  vertical-align: middle;
}
// 店名
.order span {
  margin-left: 5px;
  color: #323233;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9375;
}
// 右箭头
.icon {
  color: #969799;
  margin-left: 4px;
  width: 0.625rem;
  height: 0.625rem;
  display: inline-block;
}

// 信息页
// 商品照片开始
.iimg {
  margin-right: 14px;
  width: 72px;
  height: 72px;
  display: inline-block;
}
.iimg > img {
  border-radius: 5px;
  display: block;
  width: 100%;
  height: 100%;
}
// 商品照片结束

// 商品信息开始
.name {
  display: flex;
  margin-right: 15px;
  justify-content: space-between;
}
.name > div {
  display: inline-block;
  color: #323233;
  line-height: 20px;
  font-size: 14px;
  width: 12.0237rem;
}
.name > div span {
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
// 信息这块
.message {
  padding: 12px 12px 0;
  display: flex;
  align-items: flex-start;
}
// 第二行一整块
.jiewei {
  width: 15.45rem;
  display: flex;
  justify-content: space-between;
}
// name第二个div文字
.name div:nth-child(2) {
  color: var(--notice, #ed6a0c);
  line-height: 16px;
  margin-top: 6px;
  font-size: 12px;
}
// name最后一个div
.name div:nth-child(3) {
  margin-top: 6px;
  padding: 4px 4px;
  flex-shrink: 0;
  font-size: 12px;
  color: #e05555;
  width: 28px;
}
// name最后一个div中的  预售
.name div:nth-child(3) span {
  border-radius: 20px;
  text-align: center;
  background-color: #fff2f2;
}
.name .price {
  width: 42px;
}
// 价格
.pce {
  color: #323233;
  letter-spacing: 0;
  font-size: 14px;
}
// 数量
.name .price .count {
  color: #969799;
  line-height: 16px;
  margin-top: 8px;
  font-size: 12px;
  text-align: right;
}
// 商品信息结束

//优惠
.youhui {
  padding: 12px 12px 0;
  display: flex;
  justify-content: end;
}
.youhui > span:first-child,
.youhui > span:nth-child(2),
.youhui > span:nth-child(3) {
  font-size: 12px;
  color: #323233;
}
.youhui > span:first-child {
  margin-right: 0.25rem;
}
.youhui > span:nth-child(3) {
  margin: 0.1875rem 0.1875rem;
}
.cu {
  line-height: 18px;
  font-size: 18px;
  font-weight: 600;
  font-family: Avenir, pingfang;
}
.xiaoshu {
  font-size: 12px;
  font-weight: 600;
  font-family: Avenir, pingfang;
}
.xiugai {
  padding: 12px 12px 0;
  display: flex;
  justify-content: flex-end;
}
.btn1,
.btn2,
.btn02 {
  padding: 6px 10px;
  border-radius: 20px;
  background-color: #fff;
  font-size: 14px;
  border: 1px solid #eee;
}
.btn1 {
  margin-right: 10px;
}
.btn02 {
  color: red;
  border: 1px solid red;
}
// 轮播\
.swiper {
  position: relative;
  padding: 8px 12px;
  margin: 12px;
  border-radius: 8px;
  background-color: #eee;
}
.swiper > div {
  font-size: 14px;
  color: #323233;
  display: inline-block;
  // vertical-align: middle;
}
.box {
  margin-left: 6.25rem;
  vertical-align: middle;
  height: 1.875rem;
}

.van-swipe__track {
  transition-duration: 500ms;
  transform: translateX(-30px) !important;
  width: 120px !important;
}
.van-swipe-item {
  width: 1.75rem !important;
  height: 1.75rem !important;
  border-radius: 50%;
  transition-duration: 500ms !important;
  transform: translateX(-30px) !important;
  width: 30px !important;
}
.box,
.want {
  display: inline-block;
}
// 头像

.my-swipe img {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
}
.want {
  vertical-align: top;
}
// 箭头
.jiantou {
  position: absolute;
  display: inline-block;
  right: 0.625rem;
  top: 1.25rem;
}
</style>
